var gulp = require('gulp'),
    uglify = require("gulp-uglify"),
	minifycss = require("gulp-minify-css");
 
gulp.task('minify-js-css', function (cb) {

    gulp.src('../src/main/webapp/js/**/*.js') // 要压缩的js文件
    .pipe(uglify())  //使用uglify进行压缩,更多配置请参考：
    .pipe(gulp.dest('dist/js')); //压缩后的路径
	
	gulp.src('../src/main/webapp/js/**/*.css') 
    .pipe(gulp.dest('dist/js'));
	
	gulp.src('../src/main/webapp/styles/**/*.css') 
    .pipe(minifycss())  
    .pipe(gulp.dest('dist/styles'));
	
});

gulp.task('default', ['minify-js-css']);